From: Florian Müllner Date: Mon, 18 Jan 2010 03:16:39 +0000 (+0100) Subject: [lookingGlass] Add style information to the picker X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10384 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d7075d9913c9395c6202d393d6f17b5c8478976d;p=gnome-shell.git [lookingGlass] Add style information to the picker Currently the picker displays information on the hovered actor's position and the object itself. Adding style id and class of StWidgets to the displayed information can be very helpful for identifying a particular actor or code segment. https://bugzilla.gnome.org/show_bug.cgi?id=611211 --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 783d3ef0f..403324b5f 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -295,7 +295,14 @@ Inspector.prototype = { let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, stageX, stageY); - displayText.text = ' ' + target; + let id, style_class; + if (target instanceof St.Widget) { + id = target.get_theme_node().get_element_id(); + style_class = target.get_theme_node().get_element_class(); + } + let position = ''; + let style = '